package st.business.tepth.business.goodsreceive;

import java.util.List;

import io.reactivex.disposables.Disposable;
import st.business.tepth.base.OnDataConvertListener;
import st.business.tepth.business.bean.MaterialWaitApplyBean;
import st.shadow.library.core.base.mvp.BaseModel;
import st.shadow.library.core.base.mvp.BasePresenter;
import st.shadow.library.core.base.mvp.BaseView;

/**
 * Author: shadow
 * Email:  1025431817@qq.com
 * Time:   2019-02-25 10:17
 */

public interface GoodsReceiveContract {
    interface View extends BaseView {
        void showData(List<MaterialWaitApplyBean> list);
        void showError(String msg);

        void pickSucceed();
    }

    interface Model extends BaseModel {
        Disposable getData(String token,
                           OnDataConvertListener<List<MaterialWaitApplyBean>> listener);

        Disposable applyGoods(String token, String materialApplyList,
                              OnDataConvertListener<String> applyListener,
                              OnDataConvertListener<List<MaterialWaitApplyBean>> listener);
    }

    abstract class Presenter extends BasePresenter<View> {
        abstract void getData(String token);

        abstract void applyGoods(String token, String materialApplyList);
    }
}
